<%@page import="event.SessionKeys"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.Enumeration"%>
<%@page import="bean.Person"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="mytag" uri="/WEB-INF/CustomTagDiscriptor.tld"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>

</head>
<%
    Set<Person> search = (Set<Person>) session.getAttribute(SessionKeys.SEARCH_PERSONS);
%>
<body>
	<form action="ActionController" method="POST" name="description">
		<h2>Persons Found</h2>
		<table border="1" width="300" cellpadding="3">
			<tr>
				<td><b>ID</b></td>
				<td><b>LAST NAME</b></td>
				<td><b>FIRST NAME</b></td>
				<td><b>AGE</b></td>
			</tr>
			<%
			    for (Person pers : search) {
			%>
			<tr>
				<td><%=pers.getId()%></td>
				<td><%=pers.getLastName()%></td>
				<td><%=pers.getFirstName()%></td>
				<td><%=pers.getAge()%></td>
			</tr>
			<%
			    }
			%>
		</table>
	</form>
	
</body>
</html>